﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace Host
{
    class Program
    {
        static void Main(string[] args)
        {
            using (ServiceHost host = new ServiceHost(typeof(FirstTry.Service1)))
            {
                new Uri("http://localhost:8733/FirstTry/Service1/");
                host.Open();
                Console.WriteLine("kører på");
                foreach (var ea in host.Description.Endpoints)
                {
                    Console.WriteLine(ea.Address);
                    
                }
                using (Service.Service1Client client = new Service.Service1Client())
                {
                    Console.WriteLine(client.ToString());
                    Console.Read();
                    string hey = client.getLocationName("1");
                    Console.WriteLine(hey);
                }

                Console.ReadLine();
                host.Close();
            }
        }
    }
}
